<?php
/**
 * Primary navigation view helper
 *
 * @package     Application_Module_Default
 * @subpackage  View_Helper
 * @copyright   Copyright (c) 2009 IPB CMS <http://ipb-cms.googlecode.com/>
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
 * @author      Henrique Moody <henriquemoody@gmail.com>
 */
class View_Helper_PrimaryNavigation extends Zend_View_Helper_Abstract
{

    /**
     * Fake constructor for the current helper
     *
     * Returns the navigation of current module
     *
     * @return string
     */
    public function primaryNavigation()
    {
        $request = Zend_Controller_Front::getInstance()->getRequest();
        $module  = $request->getModuleName();
        $className = 'View_Helper_Navigation_' . ucfirst($module);
        $navigation = new $className;
        $navigation->setView($this->view);
        return $navigation;
    }

}
